<?php
    $s = microtime(true);
    $mysqli = new Mysqli('127.0.0.1', 'swoole4_ryloo_ic', '123456', 'swoole4_ryloo_ic');
    for ($i = 0; $i < 10000; $i++) {
        $sql = "INSERT INTO student (name, brands, age) VALUES ('林小侠', '中大奖啦', '29')";
        if ($mysqli->query($sql) == TRUE) {
            echo "【ID:".$i."】user entry saved successfully.".PHP_EOL;
        } else {
            echo "【ID:".$i."】INSERT attempt failed".PHP_EOL;
        }
    }
    $mysqli->close();
    echo 'the task use ' . (microtime(true) - $s) . 'seconds. Congratulations on completing all the tasks!!!';
